Texture mapping is a technique often used to provide surface details and textures to computer generated objects or models. For example, textures may be used in many video games to provide surface details to instances of objects in a game environment (for example, buildings, trees, rubble, and so forth).
In some games, instances of a particular object in a given game environment may use the same textures. In order to give variety to different instances of the objects in the game environment, a megatexture comprising texture information for all instances of objects of a particular type may be used. Each object instance in the game environment is mapped to a unique piece of the megatexture. Because each instance maps to a different portion of the megatexture, different instances of the object will appear to be different, creating a greater degree of visual variation within the game environment.